
#import <Foundation/Foundation.h>
#import "TalkfunSDK.h"
NS_ASSUME_NONNULL_BEGIN

@protocol TFdocDownloaderManagerDelegate <NSObject>
@optional
/**
    下载时的状态
 */
- (void)docDownloaderStatusUpdate:(TFdoc *)model;

@end

@interface TFdocDownloaderManager : NSObject
/**
   代理对象
 */
@property (nonatomic, weak) id<TFdocDownloaderManagerDelegate> _Nullable delegate;

/**
 下载线程数(最大为3）
 默认:1
 */
@property (nonatomic,assign) NSInteger downloadThreadNumber;
/**
 *  单例
 */
+ (_Nonnull id)shareManager;
/**
    获取课件下载列表数据
 */
-(void)getCourseDocumentList:(TFdocParam*)param
                    callback:(void (^__nullable)(NSInteger code,NSMutableArray<TFdoc *>*arr,TFError *_Nullable  error))callback;
/**
 *  获取在下载的课件列表
 */
- (NSArray <TFdoc*>*)getDownloadDocumentList;
/**
 *  开始对应的下载任务
 */
- (void)startDocDownloader:(TFdoc *)model;
/**
 *  暂停对应的下载任务
 */
- (void)pauseDocDownloader:(TFdoc *)model;
/**
 *  删除对应的下载任务
 */
-(void)deleteDocDownloader:(TFdoc *)model;

@end

NS_ASSUME_NONNULL_END
